//****************************************************************************
// @Module        Interrupt Unit
// @Filename      INT.C
// @Project       board1.dav
//----------------------------------------------------------------------------
// @Controller    Infineon XC888CLM-8FF
//
// @Compiler      Keil
//
// @Codegenerator 1.4
//
// @Description:  This file contains functions that use the IR module.
//
//----------------------------------------------------------------------------
// @Date          25.05.2011 10:47:08
//
//****************************************************************************

// USER CODE BEGIN (IR_General,1)

// USER CODE END



//****************************************************************************
// @Project Includes
//****************************************************************************
#include "REGXC888.H"
#include "CAN_BUS_DEFINES.H"
#include "TYPEDEF.H"
#include "MAIN.H"

// USER CODE BEGIN (IR_General,2)

// USER CODE END


//****************************************************************************
// @Macros
//****************************************************************************

// USER CODE BEGIN (IR_General,3)

// USER CODE END


//****************************************************************************
// @Defines
//****************************************************************************

// USER CODE BEGIN (IR_General,4)

// USER CODE END


//****************************************************************************
// @Typedefs
//****************************************************************************

// USER CODE BEGIN (IR_General,5)

// USER CODE END


//****************************************************************************
// @Imported Global Variables
//****************************************************************************

// USER CODE BEGIN (IR_General,6)

// USER CODE END


//****************************************************************************
// @Global Variables
//****************************************************************************

// USER CODE BEGIN (IR_General,7)

// USER CODE END


//****************************************************************************
// @External Prototypes
//****************************************************************************

// USER CODE BEGIN (IR_General,8)

// USER CODE END


//****************************************************************************
// @Prototypes Of Local Functions
//****************************************************************************

// USER CODE BEGIN (IR_General,9)

// USER CODE END


//****************************************************************************
// @Function      void INT_vInit(void) 
//
//----------------------------------------------------------------------------
// @Description   This is the initialization function of the IR function 
//                library. It is assumed that the SFRs used by this library 
//                are in their reset state. 
//                
//                The project settings regarding the external interrupts are 
//                taken over into the corresponding special function 
//                registers IENx (interrupt enabling), TCON and EXICONx 
//                (trigger selection)(x=0 or 1). The global enable Bit EA is 
//                not changed. The initialization of the interrupt priorities 
//                is located in function MAIN_vInit.
//
//----------------------------------------------------------------------------
// @Returnvalue   None
//
//----------------------------------------------------------------------------
// @Parameters    None
//
//----------------------------------------------------------------------------
// @Date          25.05.2011
//
//****************************************************************************

// USER CODE BEGIN (IR_Init,1)

// USER CODE END

void INT_vInit(void)
{
  // USER CODE BEGIN (IR_Init,2)

  // USER CODE END

  //   ------ Port initialization for Interrupt module-----

  //   ---------- Non Maskable Interrupt configuration ----------

  ///   NMIWDT disabled
  ///   NMIPLL disabled
  ///   NMIFLASH disabled
  ///   NMIOCDS disabled
  ///   NMIVDD disabled
  ///   NMIVDDP disabled
  ///   NMIECC disabled
  NMICON        =  0x00;         //  NMI Control Register 
  ///  ---------- external interrupt 0 ----------
  ///  disabled

  ///  ---------- external interrupt 1 ----------
  ///  disabled

  ///  ---------- external interrupt 2 ----------
  ///  disabled

  ///  ---------- external interrupt 3 to 6----------
  ///  disabled

  IEN0          =  0x02;         //  interrupt enable  register 0
  IEN1          =  0x00;         //  interrupt enable register 1
  EXICON0       =  0x00;         // external interrupt trigger select 
                                 // register 0
  EXICON1       =  0x00;         // external interrupt trigger select 
                                 // register 1
  MODPISEL      =  0x00;         // peripheral input select register 

  SFR_PAGE(_su3, noSST);         // switch to page 3 without saving
  MODPISEL1     =  0x00;         // peripheral input select register 1
  SFR_PAGE(_su0, noSST);         // switch to page 0 without saving

  // USER CODE BEGIN (IR_Init,3)

  // USER CODE END

} //  End of function INT_vInit


// USER CODE BEGIN (IR_General,10)

// USER CODE END

